<%
attachments ||= []
if attachments.collect( &:id ).any?
-%>
    <h4>Attachments</h4>
    <ul>
    <% attachments.each do |a| -%>
      <% next if a.new_record? -%>
      <li>
        <%= render :partial => 'shared/attachment', :locals => { :attachment => a } %>
      </li>
    <% end -%>
    </ul>
<% end -%>
